﻿using System;
using System.Web;

namespace KWatkins.FluentMoqBuilder
{
	/// <summary>
	/// A builder for building <see cref="HttpContextBase" /> mocks.
	/// </summary>
	public interface IHttpContextBaseBuilder : IMockBuilder<HttpContextBase>
	{
		/// <summary>
		/// Mocks the <see cref="HttpContextBase.Request" /> property.
		/// </summary>
		/// <param name="request">The request.</param>
		/// <returns>The <see cref="IHttpContextBaseBuilder" />.</returns>
		IHttpContextBaseBuilder WithRequest(HttpRequestBase request);

		/// <summary>
		/// Mocks the <see cref="HttpContextBase.Request" />.<see cref="HttpRequestBase.Url" />
		/// property.
		/// </summary>
		/// <param name="url">The URL.</param>
		/// <returns>The <see cref="IHttpContextBaseBuilder" />.</returns>
		IHttpContextBaseBuilder WithUrl(string url);

		/// <summary>
		/// Mocks the <see cref="HttpContextBase.Request" />.<see cref="HttpRequestBase.Url" />
		/// property.
		/// </summary>
		/// <param name="url">The URL.</param>
		/// <returns>The <see cref="IHttpContextBaseBuilder" />.</returns>
		IHttpContextBaseBuilder WithUrl(Uri url);

		/// <summary>
		/// Mocks the <see cref="HttpContextBase.Request" />.<see cref="HttpRequestBase.UrlReferrer" />
		/// property.
		/// </summary>
		/// <param name="urlReferrer">The URL referrer.</param>
		/// <returns>The <see cref="IHttpContextBaseBuilder" />.</returns>
		IHttpContextBaseBuilder WithUrlReferrer(string urlReferrer);

		/// <summary>
		/// Mocks the <see cref="HttpContextBase.Request" />.<see cref="HttpRequestBase.UrlReferrer" />
		/// property.
		/// </summary>
		/// <param name="urlReferrer">The URL referrer.</param>
		/// <returns>The <see cref="IHttpContextBaseBuilder" />.</returns>
		IHttpContextBaseBuilder WithUrlReferrer(Uri urlReferrer);

		/// <summary>
		/// Mocks the <see cref="HttpContextBase.Request" />.<see cref="HttpRequestBase.ApplicationPath" />
		/// property.
		/// </summary>
		/// <param name="applicationPath">The application path.</param>
		/// <returns>The <see cref="IHttpContextBaseBuilder" />.</returns>
		IHttpContextBaseBuilder WithApplicationPath(string applicationPath);

		/// <summary>
		/// Mocks the <see cref="HttpContextBase.Request" />.<see cref="HttpRequestBase.PhysicalApplicationPath" />
		/// property.
		/// </summary>
		/// <param name="physicalApplicationPath">The physical application path.</param>
		/// <returns>The <see cref="IHttpContextBaseBuilder" />.</returns>
		IHttpContextBaseBuilder WithPhysicalApplicationPath(string physicalApplicationPath);
	}
}
